package test.my.com.myapplicationtest.dong_tai_yuan_quan_tongji;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;

import java.util.ArrayList;
import java.util.List;

import test.my.com.myapplicationtest.R;

/**
 * Author : Cooper
 * Time : 2017/9/14  16:19
 * Description : 圆形动态统计图
 */

public class DynamicCircleStatisticsActivity extends Activity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.aty_dynamic_circle_statistics_layout);
        DynamicCircleStatisticsView yuan_hu = (DynamicCircleStatisticsView) findViewById(R.id.yuan_hu);
        List<DynamicCircleStatisticsView.DataEntity> dataList = new ArrayList<>();
        DynamicCircleStatisticsView.DataEntity dataEntity = new DynamicCircleStatisticsView.DataEntity("#10A6E2", 100.45f);
        DynamicCircleStatisticsView.DataEntity dataEntity1 = new DynamicCircleStatisticsView.DataEntity("#FFBF00", 129.53f);
        DynamicCircleStatisticsView.DataEntity dataEntity2 = new DynamicCircleStatisticsView.DataEntity("#FF7500", 60.89f);
        DynamicCircleStatisticsView.DataEntity dataEntity3 = new DynamicCircleStatisticsView.DataEntity("#7ED321", 220.23f);
        dataList.add(dataEntity);
        dataList.add(dataEntity1);
        dataList.add(dataEntity2);
        dataList.add(dataEntity3);
        yuan_hu.setBussinessData(dataList);
        yuan_hu.startAnimatorArc();
    }
}
